package LaunchRamp

class CommunityWorks {
    String organization
    String firstName
    String lastName
    String email
    String phone
    String address
    String bio
    byte [] image
    
    //static hasMany = { jobs: Job }

    static constraints = {
        organization matches: /^[a-z ,.'-]+$/
        firstName matches: /^[a-z ,.'-]+$/
        lastName matches: /^[a-z ,.'-]+$/
        email email: true
        phone matches: /\A([(]\d{3}[)][ ]|\d{3}([-]|[ ]))\d{3}([-]|[ ])\d{4}([x][\d][\d]|)\z/
    }
}
